Manual install php-pecl-stem:
  pecl.installed:
    - name: stem
    - defaults: True

Create extension config file for php-pecl-stem:
  # This config file only has 1 line, so just embed the content hel
  file.managed:
    - name: /etc/php.d/stem.ini
    - contents: "extension = stem.so"
    {% if salt['environ.get']('APP_NAMESPACE') != 'papi-container' %}
    - listen_in:
      - service: php-fpm
    {% endif %}
